clear, close, clc;
Nt = 80;
v = 1000;
h1 = 1000; h2 = 2000;
p1 = 50; p2 = 100; p3 = 200;
u2 = p2 / p1;
u3 = p3 / p2;
v2 = h2/h1;
i = sqrt(-1);


for j = 1:Nt
   W(j) = 10 ^ (j / 10);
   lanbta(j) =  2*pi*sqrt(2) / sqrt(W(j) *10^(-7)/p1);
%    A(j) = (tanh( sqrt(W(j) /p1)*h1 * exp(-i*pi/4) +atanh(sqrt(u2)* ...
%        tanh(sqrt(W(j) /p1)*h1 * v2 / sqrt(u2) * exp(-i*pi/4) + atanh(sqrt(u3/u2)))))) ^ 2;
   A(j) = (coth( sqrt(W(j) /p1)*h1 * exp(-i*pi/4) )) ^ 2;
   D(j) =  coth(sqrt(W(j) /p1)*h1 * exp(-i*pi/4));
   aa(j) = sqrt(W(j) /p1)*h1 * exp(-i*pi/4) +atanh(sqrt(u2)* ...
      tanh(sqrt(W(j) /p1)*h1 * v2 / sqrt(u2) * exp(-i*pi/4) + atanh(sqrt(u3/u2))));

   B(j) = real(aa(j));
   C(j) = imag(aa(j));
   bb(j) = coth(B(j));
   cc(j) = coth(C(j));
   
   
end
figure(1)
loglog(lanbta(:),bb(:))
figure(2)
loglog(lanbta(:),bb(:))